//
//  UIViewController+Category.h
//  dudu_oc_master
//
//  Created by  on 2019/11/26.
//  Copyright © 2019 Shawn Ma. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIViewController (Category)

- (void)toLastViewController;
 
- (BOOL)isContainNavChildViewController:(NSString *)controller;
- (NSArray *)removeNavChildViewControllers:(NSArray *)controllers;

- (void)dismissToRootViewController;
- (void)dismissToRootViewControllerWithAnimated:(BOOL)animated;

- (void)alertWithTitle:(nullable NSString *)title message:(nullable NSString *)message leftButtonName:(nullable NSString *)leftButtonName rightButtonName:(nullable NSString *)rightButtonName leftButtonBlock:(nullable void (^)(void))leftButtonBlock rightButtonBlock:(nullable void (^)(void))rightButtonBlock ;

- (void)showloading;
- (void)hiddenloading;

@end


@interface UINavigationController (category)


- (UIViewController *)pushViewControllerWithName:(NSString *)controllerName title:(nullable NSString *)title animated:(BOOL)animated;


@end

NS_ASSUME_NONNULL_END
